package com.example.demo.springbootdemo.demos;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/calc")
public class CalcController {
    // 注意 名字必须要
    @RequestMapping("/sum")
    public String sum(Integer num1, Integer num2) {
        return "计算结果是: " + (num1 + num2);
    }
}
